package com.bjpowernode.crm.workbench.mapper;

import com.bjpowernode.crm.workbench.domain.Activity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ActivityMapper {
    int deleteByPrimaryKey(String id);

    int insert(Activity record);

    int insertSelective(Activity record);

    Activity selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Activity activity);

    int updateByPrimaryKey(Activity record);

    List<Activity> selectActivityByCondition(Map<String, Object> param);

    void deleteActivityById(String[] ids);

    /**
     * 批量上传市场活动记录
     *
     * @param activityList
     * @return
     */
    int saveImportActivityList(List<Activity> activityList);

    /**
     * 选择批量导出
     *
     * @param ids
     * @return
     */
    List<Activity> selectActivityByIds(String[] ids);


    Activity selectActivityDetailById(String id);

    List<Activity> selectActivityByClueId(String clueId);

    List<Activity> selectSearchActivityByClueId(@Param("clueId") String clueId, @Param("searchActivityName") String searchActivityName);

    void deleteClueCorrelate(@Param("activityId") String activityId, @Param("clueId") String clueId);

    List<Activity> selectClueActivityByIdList(@Param("clueId") String clueId, @Param("searchActivityText") String searchActivityText);

}
